Skip to content

HDDS-17125. OM transferLeadership is not idempotent under client failover retry - #12040

Open
echonesis wants to merge 1 commit into
apache:masterfrom
echonesis:test-HDDS-17125
Open

echonesis wants to merge 1 commit into
apache:masterfrom
echonesis:test-HDDS-17125

Conversation

@echonesis

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

OM leadership transfer is not idempotent when a timed-out request is retried on the new leader. Although the requested target is already the leader, the handler starts another priority-setting / transfer / priority-reset cycle. This can overlap the original request and cause an unintended leader change.

This pull request:

  • Returns success immediately when the requested target is already the leader, avoiding another priority update or transfer cycle while preserving existing client failover behavior.
  • Adds regression coverage for repeated explicit-target requests after a successful transfer, verifying that the leader, term, configuration log index, and neutral priorities remain unchanged.
  • Adds a negative test confirming that an unknown OM target fails without changing the leader.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-17125

How was this patch tested?

Local Test

mvn -pl :ozone-integration-test test \
  -Dtest=TestTransferLeadershipShell \
  -DskipShade -DskipRecon

GitHub Actions CI: https://github.com/echonesis/ozone/actions/runs/43381688173

Generated-by: Codex (GPT-6)

…over retry

Return success without changing Raft priorities when a retried request
targets the current leader. Preserve existing client failover behavior.

Add regression coverage for repeated requests and unknown targets.

Co-authored-by: Codex (GPT-6)
@github-actions github-actions Bot added the om label Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant